
#ifndef FUNCTIONS_H
#define FUNCTIONS_H


#include <string>
#include <sstream>

// Convert from string to what is needed
template <class T>
bool FromString(T& t, const std::string& s, std::ios_base& (*f)(std::ios_base&))
{
	std::istringstream iss(s);
	return !(iss >> f >> t).fail();
}

#endif //FUNCTIONS_H
